﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraGrid.Views.Grid;

namespace CustomControlz.XtraGrids
{
    public partial class ccGridView : GridView
    {
        public enum EGridType
        {
            Normal = 0, Search = 1, Reporting = 2
        }
        public ccGridView()
        {
            if (!DesignMode)
            {
                InitializeComponent();
                if (GridType != null)
                {
                    if (GridType == EGridType.Normal)
                    {
                        OptionsBehavior.Editable = true;
                    }
                    else if (GridType == EGridType.Search)
                    {
                        OptionsBehavior.Editable = false;
                    }
                    else if (GridType == EGridType.Reporting)
                    {
                        OptionsBehavior.Editable = false;
                    }
                }
            }
        }

        public EGridType GridType { get; set; }
    }
}
